﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WcfService1
{
    public static class TimeExtension
    {
        public static DateTime ToDateTime(this DateTime  source)
        {
            return new DateTime(source.Year,source.Month,source.Day,DateTime.Now.Hour,DateTime.Now.Minute,DateTime.Now.Second,DateTime.Now.Millisecond);
        }

        public static DateTime ToDateTimeSell(this DateTime source)
        {
            return new DateTime(source.Year, source.Month, source.Day, 23, DateTime.Now.Minute , DateTime.Now.Second , DateTime.Now.Millisecond);
        }

        public static DateTime ToDateTimeSellAdj(this DateTime source)
        {
            return new DateTime(source.Year, source.Month, source.Day, 23, 59, 30, 0);
        }
    }
}